# JHipster generated helm package manager

## Preparation

You will need to push your image to a registry. If you have not done so, use the following commands to tag and push the images:

```
<%_ for (const app of appConfigs) { _%>
  <%_ if (app.baseName.toLowerCase() !== app.targetImageName) { _%>
$ docker image tag <%= app.baseName.toLowerCase() %> <%= app.targetImageName %>
  <%_ } _%>
$ <%= dockerPushCommand %> <%= app.targetImageName %>
<%_ } _%>
```

## Prerequisites

To use the templates generated by this sub-generator `helm cli and tiller` should be installed. Instructions on installing `helm` can be referred
at [https://github.com/helm/helm](https://github.com/helm/helm)

Once Helm is installed you need to add the below repositories:
```
helm repo add stable https://charts.helm.sh/stable
helm repo add incubator https://charts.helm.sh/incubator
```
These repositories should be added to the local cache, because this sub-generator will pull some charts from them.

This repository in turn uses the `kubernetes` sub-generator for the microservices manifests and few service like database, Elasticsearch, Prometheus etc. that are referred from the above repositories.


## Deployment

You can deploy all your applications by running the following bash command:

```
bash helm-apply.sh (or) ./helm-apply.sh
```

`helm-apply.sh` will always do a clean install. Any of the existing charts with the same identity gets removed first and then it does a clean install.

You can upgrade all your apps (if you have made any changes to the generated manifests) by running the following bash command:

```
bash helm-upgrade.sh (or) ./helm-upgrade.sh
```

For Kubernetes specific information, refer to the `kubernetes` sub-generator Readme instructions.

### Backlogs to be covered

* helm upgrade - to be tested
* Istio - to be tested
